package com.project.springboot.mongodb.examples.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import com.project.springboot.mongodb.examples.domain.User;

@Repository
public interface UserRepository extends MongoRepository<User, Long> {
	
	User findByUserName(String userName);
	
	Page<User> findAll(Pageable page);
}
